﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;

namespace InnvoiceActual.Logica.GestorObject.Factura
{
    public class PieFactura : INotifyPropertyChanged
    {

        public event PropertyChangedEventHandler PropertyChanged; 


        byte CodigoEmpresa { set; get; }  //tinyint(2) ???
        int Nrocomprobante1 { set; get; } //smallint(4)	???
        int Nrocomprobante2 { set; get; } //int(8) ???
        int _codigoTipo;       //tinyint(3)
        decimal _subtotal;    //decimal(10,2)
        int _bonificacion;     //smallint(3)
        string Transporte { set; get; }    //varchar(150)
	    string Viajante { set; get; }      //varchar(150)


        public PieFactura() { 
            CodigoTipo = 0;
            Subtotal = 0;
            Bonificacion = 10;
            Transporte = "";
            Viajante = "";
        }        


        public decimal Subtotal
        {
            get
            {
                return _subtotal;
            }
            set
            {
                _subtotal = value;
                if (PropertyChanged != null) PropertyChanged(this, new PropertyChangedEventArgs("Subtotal"));
            }
        }

        public int Bonificacion
        {
            get
            {
                return _bonificacion;
            }
            set
            {
                _bonificacion = value;
                if (PropertyChanged != null) PropertyChanged(this, new PropertyChangedEventArgs("Bonificacion"));
            }
        }


        public int CodigoTipo
        {
            get
            {
                return _codigoTipo;
            }
            set
            {
                _codigoTipo = value;
                if (PropertyChanged != null) PropertyChanged(this, new PropertyChangedEventArgs("CodigoTipo"));
            }
        }

    }
}
